package com.pn.mapper;

import com.pn.entity.User;
import com.pn.model.UserInfo;
import com.pn.page.Page;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(UserInfo record);

    int insertSelective(UserInfo record);

    UserInfo selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(UserInfo record);

    int updateByPrimaryKey(UserInfo record);

//    mycode
    //登录---查询用户信息
    UserInfo findUserByCode(String userCode);

    //查询用户行数
    Integer findUserRowCount(User user);
    //分页查询用户
    List<User> findUserByPage(@Param("page") Page page,@Param("user") User user);
    // 添加用户
    int insertUser(UserInfo userInfo);
    //修改用户状态
    int setStateByUid(Integer userId, String userState);
    //删除用户
    int setIsDeleteByUids(List<Integer> userIdlist);
    //修改用户
    int setUserNameByUid(UserInfo userInfo);
    //重置密码
    int setPwdByUid(Integer userId, String password);
}